<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

	<head>
		<title>Gimme Select Tests</title>

		<script type = "text/javascript" src = "../jsunit/app/jsUnitCore.js"></script>
		<script type = "text/javascript" src = "../utils/jsunit/jsUnitHelperFunctions.js"></script>
		<script type = "text/javascript" src = "../build/debug/gimme.js"></script>
		
		<script type = "text/javascript">
		
			function test_selectSpansUnderZoo()
			{
				var gObj = g(this.get('zoo')).select('span');
				checkArrays(this.getM('panda1', 'tiger1', 'panda2', 'panda3'), gObj.entities);
			};
			
			function test_selectTreesInForestThatArePTags()
			{
				var gObj = g(this.get('forest')).select('p.tree');
				checkArrays(this.getM('tree1', 'tree2', 'tree3', 'tree4'), gObj.entities);
			};			

		</script>
	</head>

	<body>
		<h1>Gimme Select Tests</h1>
		
		<div id = "world">

			<div id = "zoo" class = "place man-made">
				<span id = "panda1" class = "panda">Panda1</span>
				<span id = "tiger1" class = "tiger">Tiger1</span>
				<span id = "panda2" class = "panda">Panda2</span>
				<span id = "panda3" class = "panda" foo = "bar">Panda2</span>
			</div>
			<div id = "forest" class = "place natural">
				<p id = "tree1" class = "tree pine">Pine tree 1</p>
				<p id = "tree2" class = "tree oak">Oak tree 1</p>
				<span id = "chipmunk1" class = "mammal chipmunk">Chipmunk 1</span>
				<span id = "gazelle1" class = "mammal gazelle">Gazelle 1</span>
				<p id = "ivyPlant1" class = "ivy poison">Poison Ivy Plant 1</p>
				
				<div id = "smallForest" class = "place natural">
					<p id = "tree3" class = "tree conifer">Conifer tree 1</p>
					<span id = "brownBear1" class = "mammal bear brown">BrownBear 1</span>
					<span id = "racoon1" class = "mammal racoon">Racoon 1</span>
					<p id = "tree4" class = "tree maple">Maple Tree 1</p>
				</div>
			</div>
			
		</div>
	</body>

</html>